package com.example.android_practice.lifeCycle;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.LifecycleService;
import androidx.lifecycle.OnLifecycleEvent;

import com.yaoyanshe.trialfield.common.utils.YLogger;

/**
 * Created by tangcan on 20/9/26.
 * 修改人：tangcan
 * 修改时间：20/9/26 上午10:33
 * 修改备注：
 */
public class MyServiceObserver implements LifecycleObserver {

    private String TAG=this.getClass().getName();


    //当service的onCreate()调用时
    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    private void startGetLocation(){
        YLogger.d("startGetLocation");

    }

    //当service的onDestroy()调用时
    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    private void stopGetLocation(){
        YLogger.d("stopGetLocation");

    }
}
